import request from '@/service'

// 项目管理

// 查询列表
export const queryProjectListApi = (data) => {
  return request.post({ url: '/op/project/queryList', data })
}

// 新增项目
export const addProjectApi = (data) => {
  return request.post({ url: '/op/project/save', data })
}

// 修改项目
export const updateProjectApi = (data) => {
  return request.post({ url: '/op/project/update', data })
}

// 删除项目
export const deleteProjectApi = (params) => {
  return request.get({ url: '/op/project/delete', params })
}

// code重复检测
export const checkCodeApi = (params) => {
  return request.get({ url: '/op/project/verifyCode', params })
}

// 查询项目全部列表包含默认项目
export const getAllListContainDefaultApi = () => {
  return request.get({ url: '/op/project/getAllListContainDefault' })
}

// 获取项目-前端树
export const getProjectTreeApi = () => {
  return request.get({ url: '/op/project/getTree' })
}
